import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/login/login'
import Index from '@/components/index/index'
import VueResource from 'vue-resource'



Vue.use(Router)
Vue.use(VueResource);




export default new Router({
  routes: [
    {
      path: '/index',
      name: 'index',
      component: Index
    },
    {
      path: '/',
      redirect: '/index'
    },     // 这样进/ 就会跳转到/index
    {
      path: '/login',
      name: 'login',
      component: Login
    }
  ]
})
